/**
 * 
 */
package com.googlecode.bestpaper.syntax.typeface;

import com.googlecode.bestpaper.syntax.BPFatherMarkup;

/**
 * @author xalinx at gmail dot com
 * @date Dec 2, 2009
 */
public abstract class BPTypeface<I, O> extends BPFatherMarkup<I, O> {

	public BPTypeface(String content) {
		super(null, content);
	}

	/**
	 * 
	 */
	public BPTypeface() {
	}

	@Override
	public void build(I writer, int fs) throws Exception {
		int fontStyle = getFontStyle(fs);
		O mine = this.buildSelf(writer, fontStyle);
		this.buildComponents(mine, fontStyle);
	}

	protected abstract int getFontStyle(int fontStyle);

}
